import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/components/taskLayout/index.vue'
import Scene from '../views/taskViews/scene/index.vue'
import Detail from '../views/taskViews/detail/index.vue'
import Particulars from '../views/taskViews/particulars/index.vue'
import Release from '../views/taskViews/release/index.vue'
import Relesework from '../views/taskViews/addTask/index.vue'
import EditRelesework from '../views/taskViews/editTask/index.vue'
// import Analysis from '@/components/analysisExcel/index.vue' //测试路由
import Media from '../views/taskViews/media/index.vue'
import Upload from '../views/taskViews/upload/index.vue'


const routes = [{
    path: '/',
    component: Layout,
    children: [
        { path: '/scene', component: Scene },
        { path: '/detail', name: 'detail', component: Detail },
        { path: '/particulars', name: 'particulars', component: Particulars },
        { path: '/release', name: 'release', component: Release },
        {
            path: '/relesework',
            name: 'relesework',
            component: Relesework,
            // meta: {
            //   keepAlive: true, //此组件需要被缓存
            //   isBack:false//用于判断上一个页面是哪个
            // }
        },
        {
            path: '/editrelesework',
            name: 'editrelesework',
            component: EditRelesework,
        },
        { path: '/media', name: 'media', component: Media },
        { path: '/upload', name: 'upload', component: Upload, },
        // { path: '/analysis', name: 'analysis', component: Analysis, }, //测试路
    ]
}, ]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router